Automating Repetitive Actions in Paint Shop Pro X

Recording your actions in "scripts"

If you find yourself doing the same operation over and over again for many different pictures, for example, re-sizing a bunch of digital photos to put on a Web page, you can save yourself trouble and time by creating "scripts" that automate those actions.  

For example, let's say you need to reduce a large photo to Web page size (say, 600 pixels wide).  This ordinary requires several mouse clicks: you would pull down Image => Resize, then type 600 into "width", then click OK.  Here's how to create a script that will reduce that to one mouse click:

A. Recording a Script

1. Launch Paint Shop Pro X and open a picture (any picture).

2. Pull down View => Toolbars => Script.  This displays the Script toolbar:
 
.  
2. Click on the "Start Script Recording" button (looks like an open circle).  

3.  Now do the operation that you want to record into the script: For example, Pull down Image => Resize, then type 600 into "width", then click OK.  

4. Click on the "Save Script Recording" button (looks like a black square). 

5. Edit the File name so that it reflects this operation - for example, call it "ResizeTo600".  Leave the extension (PspScript) alone.  

6. Click in the "Look in:" menu and go to My Documents => My PSP files => Scripts - Trusted. This is the standard place where user-defined scripts are stored.

7 Click "Save dialog positions" and then click Save to save your script.

8. Now that this script had been defined, it appears in the "Select Script" menu (pop-up menu of pre-defined scripts in the Script Toolbar).  Click on the  "Select Script" menu and select your new script so that its name appreas in the Script Toolbar.  

9. Click the "Edit Selected Script" icon .  

10. On the line of the Script Commands that says "Resize", click where it says "Default" and select "Silent".  This means that, when the script is run,  the resize dialog box will close itself after the resize operation. 

11. Click Save to save that change and the click Close. Now the script is ready to use.

B. Using your new script

1. Open an image.

2. Select your script from the "Select Script" menu.

3. Click the "Run Selected Script" icon   (black triangle pointing to the right).  The script will run and the opened image will be resized to 600 pixels wide.  

Applying scripts to many pictures automatically

1. Pull down File => Batch Process. (No pictures need be open before you do this).

2. Click the Browse button at the top right to select the location of the pictures that you want to process.  The files in the selected folder will be displayed in the window at the top. 

3. Select the picture files that you want to modify by holding down the Ctrl key on the keyboard while clicking on each file that you want to include.  The selected files will be highlighted.  Then click the Select button.  (Or click Select All to select all the pictures in that folder.

4. If you want to apply a script to all the pictures, click the "Use script" box (center right) and select the desired script from the pop-up menu.  For example, if you want to apply the "ResizeTo600" script that you just created above, select  "ResizeTo600" .  

You can also use the pre-defined scripts that are supplied with Paint Shop Pro.  For example, if you want to apply the One Step Phot Fix to each picture selected, simply select "OneStephotoFix" from the pop-up menu.

5. Click Copy in the "Save Mode" area. This tells the program to leave the original photos alone and to save the modified pictures as new files.  But if you prefer to overwrite and replace the original files with the modified versions (perhaps because you already have the originals backed up somewhere else, or because you know you'll never need those original files again), click Overwrite instead of Copy and skip to step 11.

6. If anything appears in the Folder area, erase it so that it is blank. This tells the program to save the modified pictures in the same folder as the originals.

7. Click on the Modify button at the bottom. This brings up the Modify Filename box.

8. In the "Rename options" window, click "Document name" and then click the Add button.  Click "Custom Text" and then click the Add button. 

9. Click "Custom Text" in the "Included" window. In the "Custom text" field just below, type a word that suggests the script you chose above, for example "fixed" or "600".  This word will be added to the file name of the modified pictures so you can tell them apart from the originals in the same folder.

10. Click on the OK button to close the Modify Filename box.

11. Finally, click on the Start button to activate the batch process.  Each picture file selected in the file selection window will be opened automatically, the selected script will be run, and the modified pictures will be saved (in this case, back to the same folder, but with a modified file name).  This happens as fast as the computer can do it - you won't actually see the images being opened, but you will see a progress indicator window that lets you know the batch process is running. 

12.  When it is finished, click OK and open the folder containing your pictures to see if it worked as you expected.  You should find the modified files, with modified file names, added to the original files that were there to begin with.  

13. Once you have the Batch Process window set up to do you want, you can use it over and over with different sets of files; just select the pictures files that you want to process in the window at the top (steps 1, 2, and 3 above) and click the Start button.

(c) Tom O'Haver (toh@umd.edu), February 2006